home *** CD-ROM | disk | FTP | other *** search
/ Cinema Studio: Frank Herrmann / Cinema Studio - Frank Herrmann.iso / tools / raystorm / install_raystorm < prev    next >
Text File  |  1995-08-10  |  6KB  |  191 lines

  1. ; Install_RayStorm - RayStorm installation script for Installer
  2. ;
  3. ; Copyright © 1995 Andreas Heumann
  4. ;
  5. ; $Id: Install_RayStorm,v 1.0 1995/05/07
  6. ;
  7. ;     Installer and Installer project icon
  8. ;     (c) Copyright 1991-93 Commodore-Amiga, Inc.  All Rights Reserved.
  9. ;     Reproduced and distributed under license from Commodore.
  10. ;
  11. ;     INSTALLER SOFTWARE IS PROVIDED "AS-IS" AND SUBJECT TO CHANGE;
  12. ;     NO WARRANTIES ARE MADE.  ALL USE IS AT YOUR OWN RISK.  NO LIABILITY
  13. ;     OR RESPONSIBILITY IS ASSUMED.
  14. ;
  15. ;
  16. (welcome "    Welcome to the " @app-name " 1.0 demo version installation.\n")
  17.  
  18. ; What we are?
  19. (set app-name (cat @app-name " 1.0 demo version"))
  20.  
  21. ; "Needs"
  22. (set need-version 37)  ; version of operating system need by RayStorm
  23.  
  24. ; These directories are always present
  25. (set dir-pat (cat "(" "docs" "|" "arexx" "|" "examples" "|" "textures" "|" "brushes" "|" "objects"  ")"))
  26.  
  27. ; The source directory name
  28. (set source-dir
  29.  (if (= 1 (exists @icon))
  30.   (pathonly (expandpath @icon))
  31.   (expandpath @icon)
  32.  )
  33. )
  34.  
  35. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  36. (procedure
  37.  check-system-version
  38.  ;; is your Exec recent enough?
  39.  (set exec-version (/ (getversion) 65536))
  40.  (transcript "Running on exec version " exec-version ".")
  41.  (if (< exec-version need-version)    ; check operating system version
  42.   (
  43.    (message "The " @app-name " needs at least Exec version " need-version
  44.              " to run.\nYou have only version " exec-version ".\n"
  45.              "You can proceed with the installation, but consider "
  46.              "installing the " @app-name " with proper version of "
  47.              "the operating system."
  48.      (help "    The " @app-name " uses some system functions "
  49.             "that are not present or functional in earlier system "
  50.             "versions. Consider updating your system.\n"
  51.             "    If you have a later version of operating system "
  52.             "and are only now using older version: be sure to use "
  53.             "only release 2.04 or newer with the " @app-name ". "
  54.             "No damage happens if you run the " @app-name " with an "
  55.             "earlier operating system, however. It just "
  56.             "refuses to start.\n"
  57.             "    If you decide to continue, no changes will be made to "
  58.             "system startup files, so you must edit them yourself. "
  59.             "Refer instructions for manual installation."
  60.      )
  61.     )
  62.    (transcript "User decided to continue installation while running "
  63.                  "on operating system release earlier than 2.04."
  64.     )
  65.   )
  66.  )
  67. )
  68.  
  69. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  70. (procedure select-destination-directory
  71.  ;; Select destination directory for the installation. We suggest the user
  72.  ;; to install to the place from where the installer was started. This is
  73.  ;; since normally this software will be unarchived to its proper location
  74.  ;; and the files don't have to be copied any more.
  75.  ;;
  76.  (transcript "Selecting destination directory for the installation.")
  77.  (while
  78.   (
  79.     (set @default-dest
  80.      (askdir
  81.       (prompt "Select directory where to install the " app-name ".\n"
  82.               "You have to create a directory for " app-name " yourself."
  83.      )
  84.       (help "    Here you can specify location where to install "
  85.               "the " app-name ".\n"
  86.               "    Installation can be made on-place. "
  87.               "This is recommended if you have already unarchived "
  88.               "the " app-name " archive to its final location. "
  89.               "In this case "
  90.               "most of the files are left where they are. "
  91.               "Only necessary files are copied to different "
  92.               "positions.\n"
  93.      )
  94.       (newpath)
  95.       (default source-dir)
  96.     )
  97.    )
  98.    (if (= 2 (exists @default-dest))
  99.      0
  100.      (makedir @default-dest
  101.       (infos)
  102.      )
  103.     )
  104.   )
  105.  )
  106. )
  107.  
  108. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  109. (procedure
  110.  copy-files-to-destination ;;; Copy all files if not installing on-place
  111.  ;;
  112.  (if (= source-dir (expandpath @default-dest))
  113.   (message "\nSource and destination directories are the same, "
  114.             "not copying."
  115.     (help "    The " app-name " files don't have to be copied, "
  116.            "since the source and the destination directories are "
  117.            "the same."
  118.     )
  119.   )
  120.   ((transcript "Copying " app-name " files from " source-dir " to "
  121.                 @default-dest "."
  122.     )
  123.    (set dir-information
  124.      (cat
  125.       (if (exists "docs")
  126.           "documentation\n"
  127.       )
  128.       (if (exists "arexx")
  129.          "ARexx examples\n"
  130.       )
  131.       (if (exists "examples")
  132.          "C examples\n"
  133.       )
  134.       (if (exists "textures")
  135.          "Textures\n"
  136.       )
  137.       (if (exists "brushes")
  138.          "Brushes\n"
  139.       )
  140.       (if (exists "Objects")
  141.          "Objects\n"
  142.       )
  143.      )
  144.     )
  145.    (if (< 0 (strlen dir-information))
  146.     (foreach source-dir dir-pat
  147.       (
  148.       (set dest-dir (tackon @default-dest @each-name))
  149.        (if (NOT (exists dest-dir))
  150.         (makedir dest-dir)
  151.         )
  152.        (copyfiles (all)
  153.          (source (expandpath @each-name))
  154.          (dest dest-dir)
  155.          (prompt "Copying files to the selected location.")
  156.          (optional "askuser")
  157.         )
  158.       )
  159.      )
  160.     )
  161.    (copyfiles (source source-dir)
  162.      (dest @default-dest)
  163.      (prompt "Copying files to the selected location.")
  164.      (pattern "#?")
  165.      (files)
  166.      (infos)
  167.      (optional "askuser")
  168.    )
  169.   )
  170.  )
  171. )
  172.  
  173. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  174. ;;;
  175. ;;; Installatation sequence
  176. ;;;
  177. (message "Please remember during this installation:\n\n"
  178.      "    Read the instructions provided behind the \"Help\" "
  179.      "buttons, if you are not absolutely sure what you are doing.\n"
  180. )
  181.  
  182. (complete 00) (transcript "On making " app-name ".")
  183. (complete 01) (check-system-version)
  184. (complete 02) (select-destination-directory)
  185. (complete 100) (copy-files-to-destination)
  186.  
  187. ;;; All done!
  188.  
  189. ; EOF
  190.  
  191.